/// @tags: Nim
#include <cstdio>
#include <iostream>
#define rint register int

using std::cin;
using std::cout;

namespace BlueQuantum {

constexpr int maxn = 2e4 + 3;

int s[maxn];

inline int getLastPop(int x) {
  for (int i = 0; true; ++i) {
    if (!(x & 1)) return i;
    x >>= 1;
  }
  return 0;
}

inline int main() {
  int T;
  cin >> T;
  while (T--) {
    int n, ans = 0;
    cin >> n;
    for (int i = 1; i <= n; ++i) {
      cin >> s[i];
      if (!(i & 1)) {
        ans ^= getLastPop((s[i] - 1) | (s[i - 1] - 1));
      }
    }
    cout << (ans ? "YES\n" : "NO\n");
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P2148 [SDOI2009] E&D.in", "r", stdin);
  freopen("P2148 [SDOI2009] E&D.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
